#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
    int a, b;
    while (scanf("%d %d", &a, &b) != EOF)
    {
        int i = 0;
        int amount = 0;
        int paragon = 0;
        paragon = a ^ b;

        for (i = 1; i <= 32; i++, paragon = paragon >> 1)
        {
            if ((paragon & 1) == 1)
                amount++;
        }

        printf("%d", amount);
    }
    return 0;
}